package com.kingmed.kmss.admin.modules.ums.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kingmed.kmss.admin.modules.ums.mapper.UmsAdminOrganizationRelationMapper;
import com.kingmed.kmss.admin.modules.ums.model.UmsAdminOrganizationRelation;
import com.kingmed.kmss.admin.modules.ums.service.UmsAdminOrganizationRelationService;

import org.springframework.stereotype.Service;

/**
 * <p>
 * 后台用户和组织结构关系表 服务实现类
 * </p>
 *
 * @author wyl
 * @since 2022-12-13
 */
@Service
public class UmsAdminOrganizationRelationServiceImpl extends ServiceImpl<UmsAdminOrganizationRelationMapper, UmsAdminOrganizationRelation> implements UmsAdminOrganizationRelationService {

    @Override
    public void deleteByAdminId(Long adminId) {
        this.getBaseMapper().delete(
                new QueryWrapper<UmsAdminOrganizationRelation>().lambda().eq(UmsAdminOrganizationRelation::getAdminId, adminId)
        );
    }
}
